package com.nbcio.pm.domain.vo;

import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 项目管理报表统计视图对象
 *
 * @author nbacheng
 */
@Data
public class PmReportStatsVo {

    /** 项目统计 */
    private ProjectStats projectStats;
    
    /** 任务统计 */
    private TaskStats taskStats;
    
    /** 时间统计 */
    private TimeStats timeStats;
    
    /** 成员统计 */
    private MemberStats memberStats;
    
    /** 项目进度统计 */
    private List<ProjectProgressStats> projectProgressStats;
    
    /** 任务状态分布 */
    private List<TaskStatusStats> taskStatusStats;
    
    /** 时间跟踪统计 */
    private List<TimeTrackingStats> timeTrackingStats;

    @Data
    public static class ProjectStats {
        private Long totalProjects;
        private Long activeProjects;
        private Long completedProjects;
        private Long overdueProjects;
        private BigDecimal completionRate;
    }

    @Data
    public static class TaskStats {
        private Long totalTasks;
        private Long completedTasks;
        private Long inProgressTasks;
        private Long pendingTasks;
        private Long overdueTasks;
        private BigDecimal taskCompletionRate;
    }

    @Data
    public static class TimeStats {
        private BigDecimal totalHours;
        private BigDecimal billableHours;
        private BigDecimal nonBillableHours;
        private BigDecimal averageHoursPerDay;
        private Long totalRecords;
    }

    @Data
    public static class MemberStats {
        private Long totalMembers;
        private Long activeMembers;
        private Long inactiveMembers;
        private Long newMembersThisMonth;
    }

    @Data
    public static class ProjectProgressStats {
        private Long projectId;
        private String projectName;
        private BigDecimal progress;
        private String status;
        private LocalDate startDate;
        private LocalDate endDate;
        private Long totalTasks;
        private Long completedTasks;
    }

    @Data
    public static class TaskStatusStats {
        private String status;
        private String statusName;
        private Long count;
        private BigDecimal percentage;
    }

    @Data
    public static class TimeTrackingStats {
        private String date;
        private BigDecimal hours;
        private Long recordCount;
        private String projectName;
        private String taskName;
        private String userName;
    }
}
